Re: [GENERAL] alter table ?

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: [GENERAL] alter table ?
Дата
Msg-id l03110704b2747312d041@[147.233.159.109]
обсуждение исходный текст
Ответ на Re: [GENERAL] alter table ?  (Kevin Heflin <kheflin@shreve.net>)
Ответы Re: [GENERAL] alter table ?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-general
At 12:18 +0200 on 13/11/98, Kevin Heflin wrote:


> Yea, I did that, but I guess what I'm looking for, was that when ever
> anything was added to the table. Regardless of whether or not the
> spamblock was specified, it would be set to 'TRUE'

I guess adding constraints in alter statement is something to be placed in
Postgres's todo list if it is not there already.

But personally, I prefer doing this with "definition file" - SQL files
which define all the tables in my database.

In case of alteration, I dump all my tables and sequences, re-run the
creation file (which drops all tables and redefines everything), and reload
the tables and sequences - possibly adding data within the dump files to
reflect the addition or removal of columns.

This way, you can always recreate your database, create a second mirror, a
production database, etc. - and you can fill the "definition file" with
comments which will help you understand what you meant a year afterwards.

It's a tradition I kept from the time we used Oracle in one of my former
jobs. I think it's a practice taught in basic Oracle training, but it's
good for any database (that supports SQL/DDL scripts).

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-general по дате отправления:

Предыдущее
От: "Sergei Chernev"
Дата:
Сообщение: RE: [GENERAL] PL/pgSQL
Следующее
От: "송기원"
Дата:
Сообщение: how to use "text" type data